Method and device for detecting blurriness of human face in image and computer-readable storage medium

ABSTRACT

A method for detecting blurriness of a human face in an image includes: performing a face detection in a target image; when a human face is detected in the target image, cropping the human face from the target image to obtain a face image and inputting the face image to a first neural network model to perform preliminary detection on a blurriness of the human face in the face image to obtain a preliminary detection result; and when the preliminary detection result meets a deep detection condition, inputting the face image to a second neural network model to perform deep detection on the blurriness of the human face in the face image to obtain a deep detection result.

CROSS REFERENCE TO RELATED APPLICATIONS

This application claims priority to Chinese Patent Application No.CN202010776747.1, filed Aug. 5, 2020, which is hereby incorporated byreference herein as if set forth in its entirety.

BACKGROUND 1. Technical Field

The present disclosure generally relates to face detection technologies,and particularly to a method and device for detecting blurriness of ahuman face in a target image.

2. Description of Related Art

Face recognition systems that work with focused images have difficultywhen presented with blurred data, which in general arise due toout-of-focus lens, atmospheric turbulence, and relative motion betweenthe sensor and objects in the scene.

Some conventional recognition systems use gradient values to indicatethe clarity of images. One problem with such approach is when there isnoise interference (such as external ambient light or other noiseinterference), the image gradient values cannot accurately reflect theclarity of images.

Therefore, there is a need to provide a method for detecting theblurriness of a human face in an image and a device to overcome theabove-mentioned problems.

BRIEF DESCRIPTION OF THE DRAWINGS

Many aspects of the present embodiments can be better understood withreference to the following drawings. The components in the drawings arenot necessarily drawn to scale, the emphasis instead being placed uponclearly illustrating the principles of the present embodiments.Moreover, in the drawings, all the views are schematic, and likereference numerals designate corresponding parts throughout the severalviews.

FIG. 1 is a schematic block diagram of a device for detecting blurrinessof a human face in a target image according to one embodiment.

FIG. 2 is a flowchart of a method for detecting blurriness of a humanface in a target image according to one embodiment.

FIG. 3 is a flowchart of a method for obtaining a preliminary detectionresult according to one embodiment.

FIG. 4 is a flowchart of a method for obtaining a deep detection resultaccording to one embodiment.

FIG. 5 is a flowchart of a method for training a second neural networkmodel according to one embodiment.

FIG. 6 is a flowchart of a method for detecting blurriness of a humanface in a target image according to one embodiment.

FIG. 7 is a schematic block diagram of a blurriness detecting deviceaccording to one embodiment.

FIG. 8 is a schematic block diagram of a first obtaining moduleaccording to one embodiment.

FIG. 9 is a schematic block diagram of a second obtaining moduleaccording to one embodiment.

DETAILED DESCRIPTION

The disclosure is illustrated by way of example and not by way oflimitation in the figures of the accompanying drawings, in which likereference numerals indicate similar elements. It should be noted thatreferences to “an” or “one” embodiment in this disclosure are notnecessarily to the same embodiment, and such references can mean “atleast one” embodiment.

The method for detecting blurriness of a human face in an imageaccording to embodiments of the present disclosure can be implemented byvarious devices. These devices may include robots, mobile phones, tabletcomputers, wearable devices, vehicle-mounted devices, augmented reality(AR) devices, virtual reality (VR) devices, notebook computers,ultra-mobile personal computers (UMPC), netbooks, and personal digitalassistants (PDAs). The present disclosure does not impose anyrestrictions on the type of the devices implementing the method.

Referring to FIG. 1, in one embodiment, a device 1 for implementing themethod for detecting blurriness of a human face in an image may includea processor 101, a storage 102, and one or more executable computerprograms 103 that are stored in the storage 102. The processor 101 iselectrically connected to the storage 105, and performs correspondingoperations by executing the executable computer programs 103 stored inthe storage 102. When the processor 101 executes the computer programs103, the steps in the embodiments of the method for controlling thedevice 1, such as steps S101 to S103 in FIG. 2, steps S1021 to S1024 inFIG. 3, steps S1031 to S1033 in FIG. 4, steps S201 to S204 in FIG. 5,and steps S301 to S303 in FIG. 6 are implemented.

The processor 101 may be a central processing unit (CPU), ageneral-purpose processor, a digital signal processor (DSP), anapplication specific integrated circuit (ASIC), a field-programmablegate array (FPGA), a programmable logic device, a discrete gate, atransistor logic device, or a discrete hardware component. Thegeneral-purpose processor may be a microprocessor or any conventionalprocessor or the like.

The storage 102 may be an internal storage unit of the robot 1, such asa hard disk or a memory. The storage 102 may also be an external storagedevice of the robot 1, such as a plug-in hard disk, a smart memory card(SMC), and a secure digital (SD) card, or any suitable flash cards.Furthermore, the storage 102 may also include both an internal storageunit and an external storage device. The storage 102 is used to storecomputer programs, other programs, and data required by the robot. Thestorage 102 can also be used to temporarily store data that have beenoutput or is about to be output.

Exemplarily, the one or more computer programs 103 may be divided intoone or more modules/units, and the one or more modules/units are storedin the storage 102 and executable by the processor 101. The one or moremodules/units may be a series of computer program instruction segmentscapable of performing specific functions, and the instruction segmentsare used to describe the execution process of the one or more computerprograms 103 in the robot 1. For example, the one or more computerprograms 112 may be divided into a detection module 601, a firstobtaining module 602, and a second obtaining module 603 as shown in FIG.6.

Referring to FIG. 2, in one embodiment, a method for detectingblurriness of a human face in an image may include the following steps.

Step S101: Perform a face detection in a target image.

The target image may be captured by an image capturing device of thedevice 1, such as a camera. The target image may be obtained from avideo streaming captured by the image capturing device. The device 1 mayreceive the target image from an external device. The device 1 mayperform the face detection by executing a face detection algorithm todetermine the position and number of faces in the target image.

Step S102: In response to detection of a human face in the target image,crop the human face from the target image to obtain a face image andinput the face image to a first neural network model to performpreliminary detection on a blurriness of the human face in the faceimage to obtain a preliminary detection result.

When there is a human face in the target image, the device 1 may cropthe human face from the target image based on the position of the humanface to obtain a face image. The device 1 may then input the face imageto a first neural network model to perform preliminary detection on ablurriness of the human face in the face image to obtain and output apreliminary detection result. The first neural network model is a neuralnetwork model that performs preliminary detection on the blurriness ofthe human face in the face image. The blurriness is configured toreflect the clarity of the human face in the face image3

In one embodiment, the first neural network model may be trained beforestep S102 to obtain a pre-trained first neural network model. The outputresult of the pre-trained first neural network model is the facialblurriness classification result of the face image. The first neuralnetwork model can use a lightweight network for network design, such asa neural network model constructed based on a lightweight neural networksuch as moblenetv2, mobilenetv3_small, smallmobilenetv2, shufflenetv2 ormobileface. The lightweight neural network models are suitable fordeployment on robots.

In one embodiment, a lightweight network can be used for network design,such as building a neural network model based on mobilenetv2, which hasa better classification effect. The network structure based on themobilenetv2 model is shown in Table 1 below.

TABLE 1 Input Operator t c n s 64,64,3 conv3*3 —  64 1 1 64,64,64Depthwise conv3*3 —  64 1 1 64,64,64 bottleneck 2  64 5 2 31,31,64bottleneck 4 128 1 2 15,15,128 bottleneck 2 128 6 1 15,15,128 bottleneck4 128 1 2 7,7,128 bottleneck 2 128 2 1 7,7,128 conv1*1 — 512 1 1 7,7,512Linear GDconv7*7 — 512 1 1 1,1,512 Linear conv1*1 — X 1 1

In Table 1, t represents the transposition amplification factor inbottleneck, c represents the number of convolution kernel channels, nrepresents the number of operator repetitions, and s represents stridein case of the device 1 is a humanoid robot. For example, the second rowin Table 1 can represent the convolutional layer of the input image witha size of 64×64×3 (where 3 means that the image has three channels)convolved with a 3×3 convolution kernel (i.e., cony 3*3). Sine the layerhas 64 convolution kernel channels, each convolution kernel channel willgenerate a 64×64×1 image, and the final image data output by this layeris 64×64×64 (i.e., the input of the third row in Table 1), which has 64channels. Similarly, the output obtained after the input of the nth rowin Table 1 is operated on the corresponding row is used as the input ofthe (n+1)th row. The algorithm derivation process of the output obtainedfrom the input of each line can refer to the derivation process of thenetwork model structure of mobilenetv2, which will not be repeated.

Referring to FIG. 3, in one embodiment, step S102 may further includesteps S1021 to S1024.

Step S1021: Input the face image to the first neural network model toclassify the blurriness of the human face in the face image to obtain afacial blurriness classification result, wherein the facial blurrinessclassification result may include a first-level blurriness, asecond-level blurriness, and a third-level blurriness that are arrangedin descending order of blurriness.

In one embodiment, the first neural network model here is aclassification model that has been trained and is used to classify theinput face images by blurriness, and the obtained preliminary detectionresult is the result of classifying the blurriness.

In a specific application scenario, the classification task of the firstneural network model can be divided into three categories for trainingin advance, such as first-level blurriness, second-level blurriness, andthird-level blurriness arranged in order of blurriness from large tosmall. The first-level blurriness is to indicate a blurred face image,the second-level blurriness is to indicate a moderate clear face image,and the third-level blurriness is to indicate a fully clear face image.Compared to categorizing the input face images into two categories(i.e., blurred face image and clear face image), categorizing the inputface images into three categories facilitates the improvement ofaccuracy.

Step S1022: In response to the facial blurriness classification resultbeing a first-level blurriness, determine that the human face in theface image is blurred.

Specifically, the blurriness of the human face in the face image isclassified in the first neural network model. When the blurriness of thehuman face in the face image is classified as first-level blurriness,the human face in the face image is determined as “blurred”.

Step S1023: In response to the facial blurriness classification resultbeing a second-level blurriness, determine that the preliminarydetection result meets a deep detection condition.

Specifically, the blurriness of the human face in the face image isclassified in the first neural network model. When the blurriness of thehuman face in the face image is classified as second-level blurriness,the human face in the face image is determined as “moderate clear”. Inthis case, the face image needs to be further checked. That is, when thefacial blurriness classification result is a second-level blurriness, itis determined that the preliminary detection result meets the deepdetection condition.

Step S1024: In response to the facial blurriness classification resultbeing a third-level blurriness, determine that the human face in theface image is clear.

Specifically, the blurriness of the human face in the face image isclassified in the first neural network model. When the blurriness of thehuman face in the face image is classified as third-level blurriness,the human face in the face image is determined as “clear”.

Step S103: In response to the preliminary detection result meeting adeep detection condition, input the face image to a second neuralnetwork model to perform deep detection on the blurriness of the humanface in the face image to obtain a deep detection result.

Specifically, when the preliminary detection result meets the deepdetection condition, the face image meeting the deep detection conditionwill be inputted into the second neural network model to perform deepdetection on the blurriness of the human face in the face image toobtain and output the deep detection result.

Referring to FIG. 4, in one embodiment, step S103 may include stepsS1031 to S1033.

Step S1031: In response to the preliminary detection result meeting thedeep detection condition, input the face image to the second neuralnetwork model to score the blurriness of the human face.

In one embodiment, the second neural network model here is a trainedneural network model for scoring the blurriness of the face in the inputface image to obtain the score the blurriness of the human face.

Step S1032: In response to a score of the blurriness of the human facebeing less than the preset threshold, determine that the human face inthe face image is blurred.

When the score of the blurriness of the human face is less than thepreset threshold, it is determined that the human face in the face imageis blurred.

Step S1033: In response to a score of the blurriness of the human facebeing greater than or equal to the preset threshold, determine that thehuman face in the face image is clear.

When the score of the blurriness of the human face is greater than orequal to the preset threshold, it is determined that the human face inthe face image is clear.

In one embodiment, the method may include, before performing a facedetection in a target image, training the second neural network model.The output result of the second neural network model is the score of theblurriness of the human face.

In one embodiment, the second neural network model can use a lightweightnetwork for network design, such as a neural network model constructedbased on a lightweight neural network such as mobilenetv2,mobilenetv3_small, smallmobilenetv2, shufflenetv2 or mobileface.

Referring to FIG. 5, in one embodiment, training the second neuralnetwork model may include the following steps.

Step S201: Obtain a face image set including a number of training faceimages.

Specifically, a large number of face images are obtained in advance, andthe score of the blurriness of a human face in each face image is thenflagged. The flagged face image set is used as the training face imageset to train the second neural network model.

Step S202: Train the second neural network model based on the face imageset to obtain a probability of each of the training face images being ofeach of predefined N-type blur levels, where N≥2.

Specifically, the training face image set is inputted to the secondneural network model to obtain the probability of each of the trainingface images being of each of predefined N-type blur levels.

Step S203: Calculate a score of blurriness of a human face in each ofthe training face images based on the probability of each of thetraining face images being of each of predefined N-type blur levels.

In an exemplary application scenario, the score of blurriness of eachhuman face can be obtained based on the idea of deep expectation DEX,such as combining the ideas of classification and regression to trainthe second neural network model, and performing classification trainingfirst. For example, the classification network in the second neuralnetwork model will classify, and the output is three categories (i.e.,first-level blurriness, second-level blurriness, and third-levelblurriness). It is assumed that the default score y={0, 60, 100} isassigned, that is, the default score of the first-level blurriness is 0,the default score of the second-level blurriness is 60, and the defaultscore of the third-level blurriness is 100. The classification networklayer in the second neural network can obtain the probability o={o1, o2,o3} that the blurriness of each human face is classified into thesethree categories, and the final scores of the input face images can becalculated according to the probability of the classification result.

In one embodiment, the score of blurriness of the human face in each ofthe training face images is calculated according to the followingformula:

${{E(O)} = {\underset{i}{\sum\limits^{N}}{y_{i} \times o_{i}}}},$

where E(O) represents the score of blurriness of the human face, y_(i)represents the probability of each of the training face images being ofa predefined i-type blur level, and O_(i) represents a score of thei-type blur level. The value of N is set to 3 when the output is threecategories.

In one exemplary application, it is assumed that the face images areclassified into 3 categories, and the default scores of the threeblurriness levels (first-level blurriness, second-level blurriness, andthird-level blurriness) y={0, 60, 100}. The classification network inthe second neural network obtains the results of these three categorieso={o1, o2, o3}, where o1, o2, and 03 respectively represent theprobability of facial blurriness being classified into the threecategories. Each blurriness level y is then multiplied by theprobability of the corresponding category according to the formula

${{E(O)} = {\underset{i}{\sum\limits^{N}}{y_{i} \times o_{i}}}},$

which finally obtains the facial blurriness score.

In one exemplary application scenario, when the blurriness of the faceimage input into the second neural network is a third-level blurriness(which indicates a clear face image), and the output score of the facialblurriness will be distributed around 100. When the blurriness of theface image input into the second neural network is a first-levelblurriness (which indicates a blurred face image), and the output scoreof the facial blurriness will be distributed around 0. When theblurriness of the face image input into the second neural network is asecond-level blurriness (which indicates a moderate clear face image),and the output score of the facial blurriness will be distributed around60. If a face image is not clearer than a standard moderate clear faceimage, its score of blurriness will be less than 60. If a face image isclearer than the standard moderate clear face image, its score ofblurriness will be greater than 60. Therefore, using 60 points as thethreshold of the blurriness is helpful for face recognition.

Step S204: In response to a preset loss function converging, stop thetraining of the second neural network model, wherein the loss functionis configured to indicate a difference between the calculated score ofblurriness of a human face in each of the training face images and apre-flagged score of blurriness of the human face in a corresponding oneof the training face images.

In one embodiment, the preset loss function is to indicate thecalculated difference between the angle values of the three postureangles of each of the face images and the angle values of the flaggedthree posture angles. The preset loss function may be a cross entropyloss function, a mean square error loss function and the like.

When the preset loss function of the neural network model does notconverge, the procedure goes back to the step of training the secondneural network model based on the face image set until the preset lossfunction converges. For example, in an exemplary application scenario,when the output value of the preset loss function is greater than thepreset error value, the procedure goes back to the step of training thesecond neural network model based on the face image set until the outputvalue of the preset loss function is less than or equal to a presetthreshold.

Referring to FIG. 6, in one embodiment, step S102 may include steps S301to S303.

Step S301: In response to detection of the human face in the targetimage, detect key points of the human face in the face image.

In one embodiment, the key points can be several feature points in keypositions such as eyes, nose, and mouth of the human face. For example,the feature points can be the positions of the feature points extractedfrom positions such as the inner corner of the left eye, the innercorner of the right eye, the tip of the nose, the left corner of themouth, and the right corner of the mouth. After the key points aredetected, the coordinates of the corresponding key points in the faceare determined.

Step S302: Correct the face image based on coordinates of the key pointsand coordinates of key points of a standard face image to obtain acorrected face image.

The range of the coordinates of the key points of the standard faceimage is predetermined. When the positions of the key points in thedetected face image are not within the range of the positions of the keypoints of the standard face, the face image needs to be corrected. Forexample, the correction of the face image can be achieved through keypoint alignment for the coordinates of the facial feature points usingsimilar transformation.

Step S303: Input the corrected face image to the first neural networkmodel to perform preliminary detection on the blurriness of the humanface in the corrected face image to obtain the preliminary detectionresult.

Specifically, after key point alignment of the face image, the alignedface image will be inputted to the first neural network model to performpreliminary detection on the blurriness of the human face in thecorrected face image to obtain the preliminary detection result.

When the preliminary detection result meets the deep detectioncondition, the aligned face image will he inputted to the second neuralnetwork model to perform deep detection on the blurriness of the humanface in the face image to obtain the deep detection result.

In the embodiments of the present disclosure, the face image is firstpreliminarily detected using the first neural network model, and whenthe preliminary detection result meets the deep detection condition, adeep detection will be performed using the second neural network toobtain the deep detection result of the blurriness of the human face,which can improve the accuracy of determining the blurriness of thehuman face in the target image.

FIG. 7 shows a schematic block diagram of a blurriness detecting device600 according to one embodiment. The blurriness detecting device 600 mayinclude a detection module 601, a first obtaining module 602, and asecond obtaining module 603. The detection module 601 is to perform aface detection in a target image. The first obtaining module 602 is to,in response to detection of a human face in the target image, crop thehuman face from the target image to obtain a face image and input theface image to a first neural network model to perform preliminarydetection on a blurriness of the human face in the face image to obtaina preliminary detection result. The second obtaining module 603 is to,in response to the preliminary detection result meeting a deep detectioncondition, input the face image to a second neural network model toperform deep detection on the blurriness of the human face in the faceimage to obtain a deep detection result.

Referring to FIG. 8, in one embodiment, the first obtaining module 602may include a first obtaining unit 6021, a first determining unit 6022,a second determining unit 6023, and a third determining unit 6024. Thefirst obtaining unit 6021 is to input the face image to the first neuralnetwork model to classify the blurriness of the human face in the faceimage to obtain a facial blurriness classification result. The facialblurriness classification result may include a first-level blurriness, asecond-level blurriness, and a third-level blurriness that are arrangedin descending order of blurriness. The first determining unit 6022 isto, in response to the facial blurriness classification result being afirst-level blurriness, determine that the human face in the face imageis blurred. The second determining unit 6023 is to, in response to thefacial blurriness classification result being a second-level blurriness,determine that the preliminary detection result meets a deep detectioncondition. The third determining unit 6024 is to, in response to thefacial blurriness classification result being a third-level blurriness,determine that the human face in the face image is clear.

Referring to FIG. 9, in one embodiment, the second obtaining module 603may include a second obtaining unit 6031, a fourth determining unit6032, and a fifth determining unit 6033. The second obtaining module 603is to, in response to the preliminary detection result meeting the deepdetection condition, input the face image to the second neural networkmodel to score the blurriness of the human face. The fourth determiningunit 6032 is to, in response to a score of the blurriness of the humanface being less than the preset threshold, determine that the human facein the face image is blurred. The fifth determining unit 6032 is to, inresponse to a score of the blurriness of the human face being greaterthan or equal to the preset threshold, determine that the human face inthe face image is clear.

In one embodiment, the first obtaining module 602 may include adetection unit, a correcting unit, and a third obtaining unit. Thedetection unit is to detect key points of the human face in the faceimage in response to detection of the human face in the target image.The correcting unit is to correct the face image based on coordinates ofthe key points and coordinates of key points of a standard face image toobtain a corrected face image. The third obtaining unit is to input thecorrected face image to the first neural network model to performpreliminary detection on the blurriness of the human face in thecorrected face image to obtain the preliminary detection result.

In one embodiment, the device 600 may further include a training moduleto train the second neural network model. The output result of thesecond neural network model is the score of the blurriness of the humanface.

In one embodiment, the training module is configured to: obtain a faceimage set comprising a plurality of training face images; train thesecond neural network model based on the face image set to obtain aprobability of each of the training face images being of each ofpredefined N-type blur levels, wherein N≤2; calculate a score ofblurriness of a human face in each of the training face images based onthe probability of each of the training face images being of each ofpredefined N-type blur levels; and in response to a preset loss functionconverging, stop the training of the second neural network model. Theloss function indicates a difference between the calculated score ofblurriness of a human face in each of the training face images and apre-flagged score of blurriness of the human face in a corresponding oneof the training face images.

In one embodiment, the score of blurriness of the human face in each ofthe training face images is calculated according to the followingformula:

${{E(O)} = {\underset{i}{\sum\limits^{N}}{y_{i} \times o_{i}}}},$

where E(O) represents the score of blurriness of the human face, y_(i)represents the probability of each of the training face images being ofa predefined i-type blur level, and O_(i) represents a score of thei-type blur level.

In the embodiments above, the description of each embodiment has its ownemphasis. For parts that are not detailed or described in oneembodiment, reference may be made to related descriptions of otherembodiments.

A person having ordinary skill in the art may clearly understand that,for the convenience and simplicity of description, the division of theabove-mentioned functional units and modules is merely an example forillustration. In actual applications, the above-mentioned functions maybe allocated to be performed by different functional units according torequirements, that is, the internal structure of the device may bedivided into different functional units or modules to complete all orpart of the above-mentioned functions. The functional units and modulesin the embodiments may be integrated in one processing unit, or eachunit may exist alone physically, or two or more units may be integratedin one unit. The above-mentioned integrated unit may be implemented inthe form of hardware or in the form of software functional unit. Inaddition, the specific name of each functional unit and module is merelyfor the convenience of distinguishing each other and are not intended tolimit the scope of protection of the present disclosure. For thespecific operation process of the units and modules in theabove-mentioned system, reference may be made to the correspondingprocesses in the above-mentioned method embodiments, and are notdescribed herein.

A person having ordinary skill in the art may clearly understand that,the exemplificative units and steps described in the embodimentsdisclosed herein may be implemented through electronic hardware or acombination of computer software and electronic hardware. Whether thesefunctions are implemented through hardware or software depends on thespecific application and design constraints of the technical schemes.Those ordinary skilled in the art may implement the described functionsin different manners for each particular application, while suchimplementation should not be considered as beyond the scope of thepresent disclosure

In the embodiments provided by the present disclosure, it should beunderstood that the disclosed apparatus (device)/terminal device andmethod may be implemented in other manners. For example, theabove-mentioned apparatus (device)/terminal device embodiment is merelyexemplary. For example, the division of modules or units is merely alogical functional division, and other division manner may be used inactual implementations, that is, multiple units or components may becombined or be integrated into another system, or some of the featuresmay be ignored or not performed. In addition, the shown or discussedmutual coupling may be direct coupling or communication connection, andmay also be indirect coupling or communication connection through someinterfaces, devices or units, and may also be electrical, mechanical orother forms.

The units described as separate parts may or may not be physicallyseparate, and parts displayed as units may or may not be physical units,may be located in one position, or may be distributed on a plurality ofnetwork units. Some or all of the modules may be selected according toactual requirements to achieve the objectives of the solutions of theembodiments.

The functional units and modules in the embodiments may be integrated inone processing unit, or each unit may exist alone physically, or two ormore units may be integrated in one unit. The above-mentioned integratedunit may be implemented in the form of hardware or in the form ofsoftware functional unit.

When the integrated module/unit is implemented in the form of a softwarefunctional unit and is sold or used as an independent product, theintegrated module/unit may be stored in a non-transitorycomputer-readable storage medium. Based on this understanding, all orpart of the processes in the method for implementing the above-mentionedembodiments of the present disclosure may also be implemented byinstructing relevant hardware through a computer program. The computerprogram may be stored in a non-transitory computer-readable storagemedium, which may implement the steps of each of the above-mentionedmethod embodiments when executed by a processor. In which, the computerprogram includes computer program codes which may be the form of sourcecodes, object codes, executable files, certain intermediate, and thelike. The computer-readable medium may include any primitive or devicecapable of carrying the computer program codes, a recording medium, aUSB flash drive, a portable hard disk, a magnetic disk, an optical disk,a computer memory, a read-only memory (ROM), a random-access memory(RAM), electric carrier signals, telecommunication signals and softwaredistribution media. It should be noted that the content contained in thecomputer readable medium may be appropriately increased or decreasedaccording to the requirements of legislation and patent practice in thejurisdiction. For example, in some jurisdictions, according to thelegislation and patent practice, a computer readable medium does notinclude electric carrier signals and telecommunication signals. Itshould be noted that, the content included in the computer readablemedium could be appropriately increased and decreased according torequirements of legislation and patent practice under judicialjurisdictions. For example, in some judicial jurisdictions, the computerreadable medium does not include the electric carrier signal and thetelecommunication signal according to the legislation and the patentpractice.

The embodiments above are only illustrative for the technical solutionsof the present disclosure, rather than limiting the present disclosure.Although the present disclosure is described in detail with reference tothe above embodiments, those of ordinary skill in the art shouldunderstand that they still can modify the technical solutions describedin the foregoing various embodiments, or make equivalent substitutionson partial technical features; however, these modifications orsubstitutions do not make the nature of the corresponding technicalsolution depart from the spirit and scope of technical solutions ofvarious embodiments of the present disclosure, and all should beincluded within the protection scope of the present disclosure.

What is claimed is:
 1. A computer-implemented method for detectingblurriness of a human face in an image, the method comprising:performing a face detection in a target image; in response to detectionof a human face in the target image, cropping the human face from thetarget image to obtain a face image and inputting the face image to afirst neural network model to perform preliminary detection on ablurriness of the human face in the face image to obtain a preliminarydetection result; and in response to the preliminary detection resultmeeting a deep detection condition, inputting the face image to a secondneural network model to perform deep detection on the blurriness of thehuman face in the face image to obtain a deep detection result.
 2. Themethod according to claim 1, wherein inputting the face image to thefirst neural network model to perform preliminary detection on theblurriness of the human face in the face image to obtain the preliminarydetection result comprises: inputting the face image to the first neuralnetwork model to classify the blurriness of the human face in the faceimage to obtain a facial blurriness classification result, wherein thefacial blurriness classification result comprises a first-levelblurriness, a second-level blurriness, and a third-level blurriness thatare arranged in descending order of blurriness; in response to thefacial blurriness classification result being a first-level blurriness,determining that the human face in the face image is blurred; inresponse to the facial blurriness classification result being asecond-level blurriness, determining that the preliminary detectionresult meets a deep detection condition; and in response to the facialblurriness classification result being a third-level blurriness,determining that the human face in the face image is clear.
 3. Themethod according to claim 2, wherein inputting the face image to thesecond neural network model to perform deep detection on the blurrinessof the human face in the face image to obtain the deep detection resultcomprises: in response to the preliminary detection result meeting thedeep detection condition, inputting the face image to the second neuralnetwork model to score the blurriness of the human face; in response toa score of the blurriness of the human face being less than the presetthreshold, determining that the human face in the face image is blurred;and in response to a score of the blurriness of the human face beinggreater than or equal to the preset threshold, determining that thehuman face in the face image is clear.
 4. The method according to claim2, wherein inputting the face image to the first neural network model toperform preliminary detection on the blurriness of the human face in theface image to obtain the preliminary detection result comprises: inresponse to detection of the human face in the target image, detectingkey points of the human face in the face image; correcting the faceimage based on coordinates of the key points and coordinates of keypoints of a standard face image to obtain a corrected face image;inputting the corrected face image to the first neural network model toperform preliminary detection on the blurriness of the human face in thecorrected face image to obtain the preliminary detection result.
 5. Themethod according to claim 3, further comprising, before performing theface detection in the target image, training the second neural networkmodel, wherein an output result of the second neural network model isthe score of the blurriness of the human face.
 6. The method accordingto claim 5, wherein training the second neural network model comprises:obtaining a face image set comprising a plurality of training faceimages; training the second neural network model based on the face imageset to obtain a probability of each of the training face images being ofeach of predefined N-type blur levels, wherein N≥2; calculating a scoreof blurriness of a human face in each of the training face images basedon the probability of each of the training face images being of each ofpredefined N-type blur levels; and in response to a preset loss functionconverging, stopping the training of the second neural network model,wherein the loss function is configured to indicate a difference betweenthe calculated score of blurriness of a human face in each of thetraining face images and a pre-flagged score of blurriness of the humanface in a corresponding one of the training face images.
 7. The methodaccording to claim 6, wherein the score of blurriness of the human facein each of the training face images is calculated according to afollowing formula:${{E(O)} = {\underset{i}{\sum\limits^{N}}{y_{i} \times o_{i}}}},$ whereE(O) represents the score of blurriness of the human face, y_(i)represents the probability of each of the training face images being ofa predefined i-type blur level, and O_(i) represents a score of thei-type blur level.
 8. A device for detecting blurriness of a human facein an image, the device comprising: one or more processors; a memory;and one or more programs, wherein the one or more programs are stored inthe memory and configured to be executed by the one or more processors,the one or more programs comprise: performing a face detection in atarget image; in response to detection of a human face in the targetimage, cropping the human face from the target image to obtain a faceimage and inputting the face image to a first neural network model toperform preliminary detection on a blurriness of the human face in theface image to obtain a preliminary detection result; and in response tothe preliminary detection result meeting a deep detection condition,inputting the face image to a second neural network model to performdeep detection on the blurriness of the human face in the face image toobtain a deep detection result.
 9. The device according to claim 8,wherein the instructions for inputting the face image to the firstneural network model to perform preliminary detection on the blurrinessof the human face in the face image to obtain the preliminary detectionresult comprise: instructions for inputting the face image to the firstneural network model to classify the blurriness of the human face in theface image to obtain a facial blurriness classification result, whereinthe facial blurriness classification result comprises a first-levelblurriness, a second-level blurriness, and a third-level blurriness thatare arranged in descending order of blurriness; instructions for, inresponse to the facial blurriness classification result being afirst-level blurriness, determining that the human face in the faceimage is blurred; instructions for, in response to the facial blurrinessclassification result being a second-level blurriness, determining thatthe preliminary detection result meets a deep detection condition; andinstructions for, in response to the facial blurriness classificationresult being a third-level blurriness, determining that the human facein the face image is clear.
 10. The device according to claim 9, whereinthe instructions for inputting the face image to the second neuralnetwork model to perform deep detection on the blurriness of the humanface in the face image to obtain the deep detection result comprise:instructions for, in response to the preliminary detection resultmeeting the deep detection condition, inputting the face image to thesecond neural network model to score the blurriness of the human face;instructions for, in response to a score of the blurriness of the humanface being less than the preset threshold, determining that the humanface in the face image is blurred; and instructions for, in response toa score of the blurriness of the human face being greater than or equalto the preset threshold, determining that the human face in the faceimage is clear.
 11. The device according to claim 10, wherein theinstructions for inputting the face image to the first neural networkmodel to perform preliminary detection on the blurriness of the humanface in the face image to obtain the preliminary detection resultcomprise: instructions for, in response to detection of the human facein the target image, detecting key points of the human face in the faceimage; instructions for, correcting the face image based on coordinatesof the key points and coordinates of key points of a standard face imageto obtain a corrected face image; instructions for, inputting thecorrected face image to the first neural network model to performpreliminary detection on the blurriness of the human face in thecorrected face image to obtain the preliminary detection result.
 12. Thedevice according to claim 10, wherein the one or more programs furthercomprise: Instructions for training the second neural network modelbefore performing the face detection in the target image, wherein anoutput result of the second neural network model is the score of theblurriness of the human face.
 13. The device according to claim 12,wherein the instructions for training the second neural network modelcomprise: instructions for obtaining a face image set comprising aplurality of training face images; instructions for training the secondneural network model based on the face image set to obtain a probabilityof each of the training face images being of each of predefined N-typeblur levels, wherein N≥2; instructions for calculating a score ofblurriness of a human face in each of the training face images based onthe probability of each of the training face images being of each ofpredefined N-type blur levels; and instructions for, in response to apreset loss function converging, stopping the training of the secondneural network model, wherein the loss function is configured toindicate a difference between the calculated score of blurriness of ahuman face in each of the training face images and a pre-flagged scoreof blurriness of the human face in a corresponding one of the trainingface images.
 14. The device according to claim 13, wherein the score ofblurriness of the human face in each of the training face images iscalculated according to a following formula:${{E(O)} = {\underset{i}{\sum\limits^{N}}{y_{i} \times o_{i}}}},$ whereE(O) represents the score of blurriness of the human face, y_(i)represents the probability of each of the training face images being ofa predefined i-type blur level, and O_(i) represents a score of thei-type blur level.
 15. A non-transitory computer-readable storage mediumstoring one or more programs to be executed in a device, the one or moreprograms, when being executed by one or more processors of the device,causing the device to perform processing comprising: performing a facedetection in a target image; in response to detection of a human face inthe target image, cropping the human face from the target image toobtain a face image and inputting the face image to a first neuralnetwork model to perform preliminary detection on a blurriness of thehuman face in the face image to obtain a preliminary detection result;and in response to the preliminary detection result meeting a deepdetection condition, inputting the face image to a second neural networkmodel to perform deep detection on the blurriness of the human face inthe face image to obtain a deep detection result.
 16. Thecomputer-readable storage medium according to claim 15, whereininputting the face image to the first neural network model to performpreliminary detection on the blurriness of the human face in the faceimage to obtain the preliminary detection result comprises: inputtingthe face image to the first neural network model to classify theblurriness of the human face in the face image to obtain a facialblurriness classification result, wherein the facial blurrinessclassification result comprises a first-level blurriness, a second-levelblurriness, and a third-level blurriness that are arranged in descendingorder of blurriness; in response to the facial blurriness classificationresult being a first-level blurriness, determining that the human facein the face image is blurred; in response to the facial blurrinessclassification result being a second-level blurriness, determining thatthe preliminary detection result meets a deep detection condition; andin response to the facial blurriness classification result being athird-level blurriness, determining that the human face in the faceimage is clear.
 17. The computer-readable storage medium according toclaim 16, wherein inputting the face image to the second neural networkmodel to perform deep detection on the blurriness of the human face inthe face image to obtain the deep detection result comprises: inresponse to the preliminary detection result meeting the deep detectioncondition, inputting the face image to the second neural network modelto score the blurriness of the human face; in response to a score of theblurriness of the human face being less than the preset threshold,determining that the human face in the face image is blurred; and inresponse to a score of the blurriness of the human face being greaterthan or equal to the preset threshold, determining that the human facein the face image is clear.
 18. The computer-readable storage mediumaccording to claim 16, wherein inputting the face image to the firstneural network model to perform preliminary detection on the blurrinessof the human face in the face image to obtain the preliminary detectionresult comprises: in response to detection of the human face in thetarget image, detecting key points of the human face in the face image;correcting the face image based on coordinates of the key points andcoordinates of key points of a standard face image to obtain a correctedface image; inputting the corrected face image to the first neuralnetwork model to perform preliminary detection on the blurriness of thehuman face in the corrected face image to obtain the preliminarydetection result.
 19. The computer-readable storage medium according toclaim 17, further comprising, before performing the face detection inthe target image, training the second neural network model, wherein anoutput result of the second neural network model is the score of theblurriness of the human face.
 20. The computer-readable storage mediumaccording to claim 19, wherein training the second neural network modelcomprises: obtaining a face image set comprising a plurality of trainingface images; training the second neural network model based on the faceimage set to obtain a probability of each of the training face imagesbeing of each of predefined N-type blur levels, wherein N≥2; calculatinga score of blurriness of a human face in each of the training faceimages based on the probability of each of the training face imagesbeing of each of predefined N-type blur levels; and in response to apreset loss function converging, stopping the training of the secondneural network model, wherein the loss function is configured toindicate a difference between the calculated score of blurriness of ahuman face in each of the training face images and a pre-flagged scoreof blurriness of the human face in a corresponding one of the trainingface images.